﻿using System;

namespace b1.素数因子
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int arr;
            arr = int.Parse(Console.ReadLine());
            for (int i = 2; i <= arr; i++)
            {
                if (arr % i == 0)
                {
                    Console.Write(i);
                    Console.Write(" ");
                    arr = arr / i;
                    i--;
                }
            }
            Console.WriteLine();
            Console.ReadLine();
        }
    }
}